package pl.edu.agh.inpema.components.resultsSerializer.screenSerializer;

import pl.edu.agh.inpema.core.model.GlobalResultsSerializer;
import pl.edu.agh.inpema.core.model.ProfilePair;
import pl.edu.agh.inpema.core.model.globalAnalyzer.AnalyzerResults;
import pl.edu.agh.inpema.core.model.globalAnalyzer.GlobalAnalyzeResult;

public class ScreenResultsSerializer implements GlobalResultsSerializer {

	public void serialyzeResults(GlobalAnalyzeResult results) {

		for (String analyzer : results.getAnalyzers()) {
			System.out.println(" === results of "+ analyzer + " ===");
			AnalyzerResults analyzerResults = results.getAnalyzerResults(analyzer);
			for (ProfilePair pair : analyzerResults.getAllProfilePairs()) {
				int value = analyzerResults.getValue(pair);
				System.out.println(pair.getProfile1() + " -> " + pair.getProfile2() + ": "+value);
			}
		}
		
	}

}
